
export default {

  namespace: 'example',

  state: {
    example: 1
  },

  subscriptions: {
    setup({ dispatch, history }) {  // eslint-disable-line
      console.log('-------------------------------------------------------已执行');
    },
  },

  effects: {
    *fetch({ payload }, { call, put }) {  // eslint-disable-line
      yield put({ type: 'save' });
    },
  },

  reducers: {
    increment(state, action) {
      console.log(action);
      let objClone = JSON.parse(JSON.stringify(state))

      objClone.example = objClone.example + 1

      return objClone
    },
  },

};
